package com.king.cms.log;

import com.king.cms.db.DBOperator;
import com.king.cms.common.*;

/*
 * 
 */
public class LogService {
 private  static LogService LOG_INSTANCE = new LogService();
 
 private LogService(){
	 
 }
 public static LogService getInstance(){
	 if( null == LOG_INSTANCE )
		 LOG_INSTANCE = new LogService();
	 return LOG_INSTANCE;
 }
 public void writeLog(String msg,int logType,int userId,int relationId,DBOperator dbo){
	 dbo.update(InitSystem.getBpmParam("log.insert_sql"), new Object[]{msg,new Integer(logType),new Integer(userId),new Integer(relationId)});
 }
 public void writeLog(String msg,int logType,int userId,int relationId,DBOperator dbo,String name,Integer publishId){
	 dbo.update(InitSystem.getBpmParam("log.insert_sql_delete"), new Object[]{msg,new Integer(logType),new Integer(userId),new Integer(relationId),name,publishId});
 }
}
